﻿//C++ TO C# CONVERTER CRACKED BY X-CRACKER 2017 NOTE: The following #define macro was replaced in-line:
//ORIGINAL LINE: #define null ((void *)0)
//C++ TO C# CONVERTER CRACKED BY X-CRACKER 2017 NOTE: The following #define macro was replaced in-line:
//ORIGINAL LINE: #define vmpt_real(type, p) ((type *)((vm->cpu->mem->buffer) + (p)))


using System.Runtime.InteropServices;

public unsafe delegate void on_bufferRefresh_ft(vm_info_st vm,  ushort* bmp, uint x, uint y, uint w, uint h);
public unsafe delegate int on_menu_ft(vm_info_st vm, uint type, mr_menu_st* menu); //菜单消息， type=0:销毁菜单，type=1:绘制菜单，type=2:刷新菜单
public unsafe delegate int on_dialog_ft(vm_info_st vm, uint type, mr_dialog_st* dialog); //对话框消息，type=0:销毁对话框，type=1:绘制对话框，type=2:刷新对话框
public unsafe delegate int on_textbox_ft(vm_info_st vm, uint type, mr_textbox_st* text); //文本框消息，type=0:销毁文本框，type=1:绘制文本框，type=2:刷新文本框
public unsafe delegate int on_textedit_ft(vm_info_st vm, uint type, mr_textedit_st* edit); //文本编辑框消息，type=0:销毁文本编辑框，type=1:绘制文本编辑框
public unsafe delegate sbyte* on_editGetText_ft(vm_info_st vm, mr_textedit_st* edit); //文本编辑框内容获取消息

/*
虚拟机的回调函数列表（事件）
*/
//[StructLayoutAttribute(LayoutKind.Sequential, CharSet = CharSet.Ansi, Pack = 1)]
public struct vm_callback_t
{
	public on_bufferRefresh_ft onBufferRefresh;
	public on_menu_ft onMenu;
	public on_dialog_ft onDialog;
	public on_textbox_ft onTextBox;
	public on_textedit_ft onTextEdit;
	public on_editGetText_ft onEditGetText;
}
